﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shared/MasterHome.master" AutoEventWireup="true"
    CodeFile="DetailOrder.aspx.cs" Inherits="HistoryOrder" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <br />
    <asp:ListView ID="ListView1" runat="server">
        <AlternatingItemTemplate>
            <tr style="">
                <td>
                    <img src='<%# Eval("pSmallImage","ImageProduct/{0}") %>' height="100px" width="100px" alt='No Image'/>
                </td>
                <td>
                    <table id="Table1" runat="server">
                        <tr>
                            <td>
                                Product name :
                            </td>
                            <td>
                                <asp:Label ID="pNameLabel" runat="server" Text='<%# Eval("pName") %>' />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Product code :
                            </td>
                            <td>
                                <asp:Label ID="pProductCodeLabel" runat="server" Text='<%# Eval("pProductCode") %>' />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Description :
                            </td>
                            <td>
                                <asp:Label ID="pDescriptionLabel" runat="server" Text='<%# Eval("pDescription") %>' />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Price :
                            </td>
                            <td>
                                <asp:Label ID="pPriceLabel" runat="server" Text='<%# Eval("pPrice") %>' />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
           
        </AlternatingItemTemplate>
        <EmptyDataTemplate>
            <table runat="server" style="">
                <tr>
                    <td>
                        No data was returned.
                    </td>
                </tr>
            </table>
        </EmptyDataTemplate>
        <ItemTemplate>
            <tr style="">
                <td>
                    <img src='<%# Eval("pSmallImage","ImageProduct/{0}") %>' height="100px" width="100px" alt='No Image'/>
                </td>
                <td>
                    <table id="Table1" runat="server">
                        <tr>
                            <td>
                                Product name :
                            </td>
                            <td>
                                <asp:Label ID="pNameLabel" runat="server" Text='<%# Eval("pName") %>' />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Product code :
                            </td>
                            <td>
                                <asp:Label ID="pProductCodeLabel" runat="server" Text='<%# Eval("pProductCode") %>' />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Description :
                            </td>
                            <td>
                                <asp:Label ID="pDescriptionLabel" runat="server" Text='<%# Eval("pDescription") %>' />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Price :
                            </td>
                            <td>
                                <asp:Label ID="pPriceLabel" runat="server" Text='<%# Eval("pPrice") %>' />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </ItemTemplate>
        <LayoutTemplate>
            <table runat="server">
                <tr runat="server">
                    <td runat="server">
                        <table id="itemPlaceholderContainer" runat="server" border="0" style="">
                            <tr runat="server" style="">
                                <th>
                                    List Product
                                </th>
                            </tr>
                            <tr id="itemPlaceholder" runat="server">
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr runat="server">
                    <td runat="server" style="">
                    </td>
                </tr>
            </table>
        </LayoutTemplate>
    </asp:ListView>
    <asp:Label ID="Label1" runat="server" Text="Sum"></asp:Label>
    <br />
    <asp:Button ID="btnBack" runat="server" Text="Back" PostBackUrl="ListHistoryOrders.aspx" />
    <asp:Button ID="btnCancel" runat="server" Text="Cancel Order" 
        onclick="btnCancel_Click" />

    <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:ShopConnectionString %>"
        SelectCommand="SELECT [pProductCode], [pName], [pSmallImage], [pDescription], [pPrice] FROM [Products]">
    </asp:SqlDataSource>
</asp:Content>
